package com.hyt.it.ogt.ykcj.common.enums;

/**
 * 通用枚举
 *
 * @author admin
 */
public enum CommonEnums {
    EXAM_MERGE_TYPE_0("0","合并考试"),
    EXAM_MERGE_TYPE_1("1","合并科目"),

    EXAMTYPE_SHOW_OTHER_0("0", "不显示其他"),
    EXAMTYPE_SHOW_OTHER_1("1", "显示其他"),

    SCORE_LINE_TYPE_0("0", "单科分数线"),
    SCORE_LINE_TYPE_1("1", "复合分数线"),
    SCORE_LINE_TYPE_2("2", "区间分数线"),

    SCORE_LINE_DIMENSION_0("0", "考试维度"),
    SCORE_LINE_DIMENSION_1("1", "科目维度"),
    SCORE_LINE_DIMENSION_2("2", "考试组维度"),

    DATA_DEL_FLAG_D("D", "删除"),
    DATA_DEL_FLAG_N("N", "未删除"),

    COMPARISON_TYPE_0("0", "大于"),
    COMPARISON_TYPE_1("1", "大于等于"),

    SUBJECT_FLAG_K("K", "科目"),
    SUBJECT_FLAG_T("T", "题目"),

    ARCHIVED_STATUS_Y("Y", "归档"),
    ARCHIVED_STATUS_N("N", "未归档"),


    ORIGIN_0("0", "后台操作"),
    ORIGIN_1("1", "同步"),

    QUALIFIED_STATUS_Y("Y", "合格"),
    QUALIFIED_STATUS_N("N", "不合格"),
    QUALIFIED_STATUS_D("", "默认值"),

    SUBJECT_TYPE_1("1","性格测试卷"),
    SUBJECT_TYPE_2("2","普通卷"),
    SUBJECT_TYPE_3("3","编程题"),
    SUBJECT_TYPE_5("5","单题计时卷"),

    //考试系统中类型对应得试卷类型
    EXCHANGE_SUBJECT_TYPE_1("1","普通卷"),
    EXCHANGE_SUBJECT_TYPE_2("2","性格测试卷"),
    EXCHANGE_SUBJECT_TYPE_3("3","编程题"),
    EXCHANGE_SUBJECT_TYPE_5("5","单题计时卷"),

    EXAM_TYPE_ALL("", "全部"),
    EXAM_TYPE_ENTERPRISE("2", "企业招聘"),
    EXAM_TYPE_OTHER("99", "其他考试"),

    EXAMSYS_RESULT_CODE("16001", "成功"),
    EXAMSYS_RESULT_CODE_V2("20000", "成功"),

    DEPT_ID_DEFAULT("1000", "插入时候的默认部门"),

    SYS_USER_ADMIN("admin", "管理员code"),

    OVERWRITE("1", "重写"),

    REFRESHQUALIFIED("1", "重新计算"),

    EXPORT_FILE_NAME("0001", "企业招聘管理总成绩"),
    EXPORT_SHEET_NAME("0002", "企业招聘管理总成绩列表"),
    EXPORT_OTHER_FILE_NAME("0001", "其他考试总成绩"),
    EXPORT_OTHER_SHEET_NAME("0002", "其他考试总成绩列表"),

    EXPORT_SUBJECT_FILE_NAME("0001", "企业招聘管理科目成绩"),
    EXPORT_SUBJECT_SHEET_NAME("0002", "企业招聘管理科目成绩列表"),
    EXPORT_OTHER_SUBJECT_FILE_NAME("0001", "其他考试科目成绩"),
    EXPORT_OTHER_SUBJECT_SHEET_NAME("0002", "其他考试科目成绩列表"),

    EXPORT_IMPORT_TOTAL_FILE_NAME("0003", "考生总成绩导入模版"),
    EXPORT_IMPORT_SUBJECT_FILE_NAME("0004", "考生单科成绩导入模版"),
    EXPORT_IMPORT_SUBJECT_SHEET_NAME("0005", "考生科目成绩信息"),

    EXPORT_SUBJECT_ANALYSIS_FILE_NAME("0006", "科目分析"),
    EXPORT_SEX_ANALYSIS_FILE_NAME("0007", "性别分析"),
    EXPORT_EDUCATION_ANALYSIS_FILE_NAME("0008", "学历分析"),
    EXPORT_PROVINCE_ANALYSIS_FILE_NAME("0008", "地区省份分析"),
    EXPORT_CITY_ANALYSIS_FILE_NAME("0008", "地区市级分析"),
    EXPORT_EXAM_ANALYSIS_FILE_NAME("0009", "子考试分析"),
    EXPORT_EXAMROOM_ANALYSIS_FILE_NAME("0010", "考点分析"),

    //同步数据状态标志
    EXCHANGE_STATUS_UNSAVE("0", "未处理"),
    EXCHANGE_STATUS_SAVE("1", "已保存"),
    EXCHANGE_STATUS_SAVE_PART("2", "已经处理，不是全部保存"),
    EXCHANGE_STATUS_ERROR("3", "处理异常"),
    //同步学生数据状态标志
    EXCHANGE_EXAMINEE("exchange_examinee", "同步学生状态"),


    REVIEW_STATUS_1("1", "已反馈"),
    REVIEW_STATUS_0("0", "未反馈"),

    LAST_0("0", "不是最后一个分数"),
    LAST_1("1", "是最后一个分数"),

    TOTAL_SCORE_Y("Y", "总成绩"),
    TOTAL_SCORE_N("N", "科目成绩"),


    SEE_TYPE_0("0", "随时"),
    SEE_TYPE_1("1", "固定时间"),

    ANALYSIS_TYPE_SBUJECT("subject", "科目"),
    ANALYSIS_TYPE_SEX("sex", "性别"),
    ANALYSIS_TYPE_EDUCATION("education", "学历"),
    ANALYSIS_TYPE_PROVINCE("province", "省"),
    ANALYSIS_TYPE_CITY("city", "市"),
    ANALYSIS_TYPE_EXAMROOM("exmaroom", "考点"),
    ANALYSIS_TYPE_EXAM("exma", "考试"),

    CHECK_STATUS_0("0", "未勾选"),
    CHECK_STATUS_1("1", "勾选"),

    EXIST_COMPOSITE_0("0", "没有进行任何设置"),
    EXIST_COMPOSITE_1("1", "有合格率"),
    EXIST_COMPOSITE_2("2", "存在区间"),

    BINDING_STATUS_0("0", "未绑定"),
    BINDING_STATUS_1("1", "已绑定"),

    PT_REQUEST_SUCCESS("40001", "成功"),

    UNKNOWN("unkonw", "未知"),
    ;
    private String code;
    private String desc;

    CommonEnums(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CommonEnums getAnalysisByCode(String code) {
        for (CommonEnums analysisType : CommonEnums.values()) {
            if (analysisType.getCode().equals(code)) {
                return analysisType;
            }
        }
        return CommonEnums.UNKNOWN;
    }

    public String getCode() {
        return code;
    }


    public String getDesc() {
        return desc;
    }
}
